/*
 * @Author: 邵东亮 1762111402@qq.com
 * @Date: 2024-12-16 10:57:48
 * @LastEditors: 邵东亮 1762111402@qq.com
 * @LastEditTime: 2024-12-16 10:58:06
 * @Description:
 * @FilePath: \express\bigData_server\util\user-jwt.js
 */
var { expressjwt: jwt } = require("express-jwt");

// 验证token是否过期
const jwtAuth = jwt({
  secret: "jhjfhgsdjgjksdghjfk", //密匙
  algorithms: ["HS256"], //签名算法
}).unless({
  path: ["/static/*/*", "/api/login", "/api/captcha", "/api/register"],
}); // unless 设置jwt认证白名单

module.exports = jwtAuth;
